import request from '@/utils/request'

// 查询维修信息列表
export function listRepairs(query) {
  return request({
    url: '/repairs/repairs/list',
    method: 'get',
    params: query
  })
}

// 查询维修信息详细
export function getRepairs(id) {
  return request({
    url: '/repairs/repairs/' + id,
    method: 'get'
  })
}

// 新增维修信息
export function addRepairs(data) {
  return request({
    url: '/repairs/repairs',
    method: 'post',
    data: data
  })
}

// 修改维修信息
export function updateRepairs(data) {
  return request({
    url: '/repairs/repairs',
    method: 'put',
    data: data
  })
}

// 删除维修信息
export function delRepairs(id) {
  return request({
    url: '/repairs/repairs/' + id,
    method: 'delete'
  })
}

// 导出维修信息
export function exportRepairs(query) {
  return request({
    url: '/repairs/repairs/export',
    method: 'get',
    params: query
  })
}

// 询该角色下的用户列表
export function userByRoleIdList(query) {
  return request({
    url: '/repairs/repairs/userByRoleIdList',
    method: 'get',
    params: query
  })
}